<?php
namespace Fang\UserBundle\Entity;

use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
use Fang\UserBundle\Validator\Constraints as UserAssert;

/**
*@ORM\Entity
*@ORM\Table(name="users")
**/
class User
{
  /**
  *@ORM\Column(type="integer")
  *@ORM\Id
  *@ORM\GeneratedValue(strategy="AUTO")
  **/
  private $id;
  /**
  *@UserAssert\UserUnique(message="用户已存在")
  *@ORM\Column(type="string", length=255, unique=true)
  **/
  private $name;
  /**
  *@ORM\Column(type="string", length=64)
  **/
  private $password;
  /**
  *是否关闭
  *@ORM\Column(type="boolean")
  **/
  private $active;
  /**
  *@ORM\Column(type="integer")
  **/
  private $created;
  /**
  *@ORM\Column(type="integer")
  **/
  private $changed;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return User
     */
    public function setName($name)
    {
        $this->name = $name;

        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set password
     *
     * @param string $password
     * @return User
     */
    public function setPassword($password)
    {
        $this->password = $password;

        return $this;
    }

    /**
     * Get password
     *
     * @return string 
     */
    public function getPassword()
    {
        return $this->password;
    }

    /**
     * Set created
     *
     * @param integer $created
     * @return User
     */
    public function setCreated($created)
    {
        $this->created = $created;

        return $this;
    }

    /**
     * Get created
     *
     * @return integer 
     */
    public function getCreated()
    {
        return $this->created;
    }

    /**
     * Set changed
     *
     * @param integer $changed
     * @return User
     */
    public function setChanged($changed)
    {
        $this->changed = $changed;

        return $this;
    }

    /**
     * Get changed
     *
     * @return integer 
     */
    public function getChanged()
    {
        return $this->changed;
    }

    /**
     * Set active
     *
     * @param boolean $active
     * @return User
     */
    public function setActive($active)
    {
        $this->active = $active;

        return $this;
    }

    /**
     * Get active
     *
     * @return boolean 
     */
    public function getActive()
    {
        return $this->active;
    }
}
